package com.fjh.springboot_01.pojo.lesson;
import com.fjh.springboot_01.anno.State;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import java.time.LocalDateTime;
@Data
public class Lesson {

  private Integer id;
  @NotEmpty
  @Pattern(regexp = "^\\S{1,15}$")
  private String title;
  @NotEmpty
  private String content;
  @NotEmpty
  @URL
  private String coverImg;
  @NotEmpty
  @URL
  private String videoUrl;
  @State
  private String state;
  @NotNull
  private Long categoryId;
  private Integer createUser;
  private String createUserName; // 创建者用户名
  private LocalDateTime createTime;//创建时间
  private LocalDateTime updateTime;//更新时间
  
  // 点赞数量
  private Integer likeCount;
  // 收藏数量
  private Integer favoriteCount;
  // 当前用户是否点赞
  private Boolean isLiked;
  // 当前用户是否收藏
  private Boolean isFavorited;
}
